<template>
	<view>
		<view class="title">
			您对平台的建议
		</view>
		<view class="textarea">
			<u--textarea v-model="value" placeholder="请输入内容" ></u--textarea>
		</view>
		
		<view class="btn" @click="submit">
			提交
		</view>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: ''
			}
		},
		methods: {
			submit() {
				this.$myRequest('/api/driver/mine/v1/save/comment', {
					content: this.value
				}, 'POST').then(res => {
					this.$refs.uToast.show({
						message: "提交成功",
						complete() {
							uni.navigateBack({
								delta: 1
							})
						}
					})
				})
			}
		}
	}
</script>

<style lang="scss">
	.title {
		font-size: 28rpx;
		color: #333333;
		font-weight: 700;
		position: relative;
		padding-left: 20rpx;

		&:before {
			content: '';
			width: 12rpx;
			height: 24rpx;
			position: absolute;
			left: 0;
			top: 50%;
			transform: translateY(-50%);
			background: $theme-color;
		}
	}
	.textarea{
		border: 2rpx solid #f5f5f5;
		border-radius: 12rpx;
		margin: 20rpx;
	}
	.btn {
		width: 338rpx;
		height: 80rpx;
		background: #FFCE4E;
		border-radius: 40rpx;
		font-size: 28rpx;
		line-height: 80rpx;
		color: #FFFFFF;
		text-align: center;
		margin: 96rpx auto 20rpx auto;
	}
</style>